1. Field of the Invention
The present invention relates to field-programmable gate array (FPGA) integrated circuits. More particularly, the present invention relates to a versatile adder circuit for an FPGA.
2. The Prior Art
Adder circuits are known in the prior art. Numerous adder circuits have been developed for use in FPGA applications. FIGS. 1 through 3 present functional diagrams of some of the prior art circuits used to provide hardware support for arithmetic in FPGAs.
FIG. 1 is a block diagram of a carry chain employed in the AX series of FPGA products from Actel Corporation of Mountain View, Calif. This circuit uses a 2-bit look-ahead scheme, and two dedicated XOR gates per bit.
FIG. 2 shows a logic module using another scheme from the prior art. A, B, C, and D are inputs from the routing fabric. F is a 4-input lookup table (LUT), which can be configured to compute any function of its inputs. Two of the multiplexers are configuration multiplexers whose select inputs (omitted for clarity) are controlled by flash, SRAM, or other configuration memory bits. CI is the carry input from the previous logic module in a carry chain, and CO is the carry output to the next logic module in the chain. F is a 4-input LUT having an output Y that is used for normal (non-arithmetic) computations. S is the sum output used in arithmetic mode (when the carry chain is used). The AND gate is necessary to implement computing functions such as a one-bit adder where each addend is the logical AND of two inputs.
FIG. 3 is a block diagram showing another example of a logic module from the prior art. F0 and F1 are two 3-input LUTs. CI shares the B input of both F0 and F1, so the B input cannot be used in arithmetic mode. For a straightforward circuit implementation, the delay from CI to CO can be substantial.
When the carry out (CO) signal is produced by a 2:1 multiplexer from inputs P, G, and CI as in the implementations shown in FIGS. 1 and 2, the prior-art circuits employ either a logic module input or the AND of two inputs as the source of the G signal.